<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://www.tietiao.com/functions" prefix="my"%>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>修改密码</title>
<%@ include file="../include/easyjs_include.jsp"%>
<!--[if lt IE 9]>
		<script src="/_ui/js/html5.js"></script>
	<![endif]-->
<!--[if lte IE 7]>
		<link rel="stylesheet" type="text/css" media="all" href="../css/feground/ie.css" />
	<![endif]-->

<script type="text/javascript" src="./js/fg/common/utils.js"></script>
<script>
function checkData(f){
	if(f.oldPass.value==''){
		alert("原始密码不能为空");
		f.oldPass.focus();
		return false;
	}
	if(f.password.value==''){
		alert("新密码不能为空");
		f.password.focus();
		return false;
	}else if(!isPassword(f.password.value)){
		alert("新密码格式不正确，必须为6-16位的字母和数字组合");
		f.password.focus();
		return false;
	}
	
	if(f.password1.value!=f.password.value){
		alert("确认密码和新密码不一至");
		f.password1.focus();
		return false;
	}
}
</script>
</head>

<body style="overflow: inherit;" class="wider no-subnav catalog-lists">
<c:import url="../include/default_head.jsp" >
	<c:param name="menu" value="9"></c:param>
</c:import>
<div class="container">
	<div class="wider no-subnav catalog-lists" style="overflow: inherit;">
		<div id="content">
			<div class="user-info">
				<form action="./ucenter_ucenter_modifyPass.htm" method="post" onsubmit="return checkData(this)">
					${my:tokenInput()}
					<fieldset class="hastext">
						<span class="title">原始密码：</span>
						<input placeholder="请输入原始密码" name="oldPass" type="password" class="sffocus jqPlaceholder"/>
						<br>
						<span class="title">新密码：</span>
						<input placeholder="请输入新密码" id="regemail" name="password" type="password" maxlength="30" class="sffocus jqPlaceholder"/>
						<br>
						<span class="title">确认密码：</span>
						<input placeholder="请重新输入新密码" class="sffocus jqPlaceholder" name="password1"  type="password" maxlength="30"/>
						<br>
						<span class="title">&nbsp;</span>
						<button class="button sign" type="submit">确认更改</button>

					</fieldset>
				</form>
			</div>
		</div>
		<!-- / content -->
		<div class="userinfo" id="sidebar">
			<ul class="vtab">
				<li class="vtab-selected"> <a href="ucenter_ucenter_update.htm" class="user_icon_1">详细信息</a> </li>
				<li class="vtab-selected"> <a href="ucenter_ucenter_modifyPassInput.htm" class="user_icon_2">密码信息</a> </li>
				<li class="vtab-selected"> <a href="ucenter_ucenter_toSetNotice.htm" class="user_icon_3">提醒设置</a> </li>
			</ul>
		</div>
	</div>
</div>
</body>
<script type="text/javascript">
if('${result}'=='true'){
	alert('恭喜您，修改成功！');
}else if('${result}'=='false'){
	alert('${message}');
}
</script>
</html>